﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace FirmaTransportowa
{
    public partial class DispatcherPackagesListForm : Form
    {
        DispatcherPanelPresenter presenter;

        public DispatcherPackagesListForm(DispatcherPanelPresenter presenter)
        {
            InitializeComponent();
            this.presenter = presenter;
        }

        public void showDataTable()
        {
            packagesGridView.Columns[0].HeaderText = "ID";
            packagesGridView.Columns[1].HeaderText = "Status";
            packagesGridView.Columns[2].HeaderText = "Data dodania";
            packagesGridView.Columns[3].HeaderText = "Waga";
            packagesGridView.Columns[4].HeaderText = "Miejscowość startowa";
            packagesGridView.Columns[5].HeaderText = "Miejscowość docelowa";
            packagesGridView.Columns[0].Width = 100;
            packagesGridView.Columns[1].Width = 70;
            packagesGridView.Columns[2].Width = 65;
            packagesGridView.Columns[3].Width = 40;
            packagesGridView.Columns[4].Width = 135;
            packagesGridView.Columns[5].Width = 135;
        }

        private void DispatcherPackagesListForm_HelpButtonClicked(object sender, CancelEventArgs e)
        {
            HelpUtils.showHelp(this, 19);
        }

        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            if (keyData == Keys.F1)
            {
                HelpUtils.showHelp(this, 19);
                return true;
            }
            return base.ProcessCmdKey(ref msg, keyData);
        }
    }
}
